# -*- cperl -*-
{
    my $s = <<"____END_EXPECT";
check:(e;command 1):e;command 1
check:(e;command 2):e;command 2
check:(d,e;command 1):d,e;command 1
check:(d,e;command 2):d,e;command 2
foobar, invoked by foo
check:(a):a
check:(b):b
check:(c):c
check:(foo <- d a b c | bar):foo <- d a b c | bar
____END_EXPECT
    ;
    my @r;
    do { push @r, $_ if !m/^smart:.+$/ } for @result;
    my $r = join '', @r;
    $check_result = $r eq $s;
    $_ = "$file.log";
    unlink if -f;
    do {
        open F, ">$file.log" or die "$!";
        print F "==================== expecting ==\n";
        print F $s;
        print F "\n";
        print F "==================== received ===\n";
        print F $r;
        close F;
    } unless $check_result;
    print "";
}
